<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/public/inc/tags.jsp"%>
<html>
<head>
    <jsp:include page="/public/inc/head.jsp"/>
</head>
<body>
<div id="header" class="navbar navbar-static-top" role="navigation">
    <jsp:include page="/public/inc/top.jsp"/>
</div>
<div class="container-fluid" style="margin-top:5px;margin-bottom:60px;">
    <div class="row">
        <jsp:include page="/public/inc/menu.jsp"/>
        <div class="col-xs-12 col-sm-10">
            <div class="panel panel-primary">
                <div class="panel-body">
                    <div class="form-inline">
                        <form action="/system/wwdx_theme/book_list">
                            书的编号: <input type="text" class="form-control" <%--value="${model.bookid}"--%> name="bookid"
                                         placeholder="编号"/>&nbsp;&nbsp;&nbsp;&nbsp;
                            书名: <input type="text" class="form-control" <%--value="${model.bookname}"--%>
                                       name="bookname"
                                       placeholder="书名"/>&nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="hidden" value="${themeid}" name="themeid">
                            <button type="submit" class="btn btn-primary">筛选</button>
                        </form>
                    </div>
                </div>
                <div class="table-responsive">
                    <table class="table table-bordered table-hover">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>封面</th>
                            <th>编号</th>
                            <th>名称</th>
                            <th>启用</th>
                            <th>创建时间</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach var="l" items="${list}" varStatus="status">
                            <tr>
                                <td>
                                        ${status.count}
                                </td>
                                <td>
                                    <img src="http://img.readerday.com/cover/${l.bookimg}" style="height: 70px;width: 70px;">
                                </td>
                                <td>
                                        ${l.bookid}
                                </td>
                                <td>
                                        ${l.bookname}
                                </td>
                                <td>
                                    <c:choose>
                                        <c:when test="${l.status eq 0 }">
                                            <span class="btn btn-primary btn-xs">是</span>
                                        </c:when>
                                        <c:otherwise>
                                            <span class="btn btn-danger btn-xs">否</span>
                                        </c:otherwise>
                                    </c:choose>
                                </td>
                                <td>
                                    <fmt:formatDate value="${l.gmtCreated}" pattern="yyyy-MM-dd HH:mm:ss"/>
                                </td>
                                <td>
                                    <a class="btn btn-primary btn-xs"
                                       href="/system/wwdx_banner/create?id=${l.bookid}&bannertype=9">
                                        <span class="glyphicon glyphicon-heart"></span> 推荐首页
                                    </a>
                                    <a class="btn btn-primary btn-xs"
                                       href="/system/wwdx_book/chapter_list?bookid=${l.bookid}">
                                        <span class="glyphicon glyphicon-search"></span> 查看章节
                                    </a>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <div class="panel-footer">
                    <p:pagination url="/system/wwdx_theme/book_list" total="${listSize}"/>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="/public/inc/bottom.jsp"/>
</body>
</html>